import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
import state from "./state"
import getters from "./getters"
import mutations from "./mutations"
import actions from "./actions"

// 导入模块
import cart from "./modules/cart";
import user from "./modules/user";

export default new Vuex.Store({
  state,
  getters,
  mutations,
  actions,
  modules: {
    // 模块名:模块对象
    cart,
    user
  }
})
